//---------------------------------------------------------------------------

#ifndef FilterH
#define FilterH
#include <vector>
#include <classes.hpp>
using namespace std;
//---------------------------------------------------------------------------
class TFilter{

  public:
     TFilter(UINT32 iFilterFactor,UINT32 iQueueLength);
     UINT32 Gs_Filter(UINT32 AdValue);
     double Gs_FloatFilter(double value);
     UINT32 SetFiltFactor(UINT32 iFiltFct);
     UINT32  GetFiltFactor();
     vector<UINT32> GetAdBuf();
     vector<UINT32> GetFilteAdBuf();
     int  ReadAdValues(UINT32* RdAdBuf,UINT32 iLen);
     int  GetAdCount();
     void ResetFilter();
     void EnableFilter();
     void DisableFilter();
     void ClearAdBuf();


  private:
     UINT32 m_FilterFactor;
     vector<UINT32> m_AdBuf;
     vector<UINT32> m_AdCalcQueue;
     vector<UINT32> m_tempAdBuf;
     vector<double> m_valueQue;
     UINT32 index;
     UINT32 m_QueueLength;
};
#endif
